/*
 * OPIAM Suite
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */

package opiam.admin.applis.demo.forms;

import opiam.admin.applis.demo.beans.Site;

import opiam.admin.faare.struts.utils.FormUtils;

import org.apache.struts.action.ActionForm;

import java.io.Serializable;


/**
 * This class describes the site formBean.
 */
public class SiteForm extends ActionForm implements Serializable
{
    /** Site object. */
    private Site site = new Site();

    /**
     * Gets the site.
     *
     * @return The site.
     */
    public Site getSite()
    {
        return site;
    }

    /**
     * Sets the site.
     *
     * @param site  The site to set.
     */
    public void setSite(Site site)
    {
        this.site = site;
    }

    /**
     * Reset all the value of the object.
     */
    public void reset()
    {
        site = null;
    }


    /**
     * Sets the description multivalued attribute.
     *
     * @param value  The description to set.
     * @see The "Tag MultiEdit" paragraph in the Integrator guide.
     */
    public void setDescriptionMod(String value)
    {
        site.setDescription(FormUtils.getMultiVal(value));
    }
}
